package objects.base;

public class Document {
	private int number;
	private String str;
	private int voteOrOpinionCount;
	
	/**
	 * A document can be a poll or a topic
	 * 
	 * @param number
	 * @param title
	 * @param number of vote or number of opinion, depend on document type
	 */
	
	public Document(int number,String str,int voteOrOpinionCount){
		this.number = number;
		this.str = str;
		this.voteOrOpinionCount = voteOrOpinionCount;
	}
	
	public void setNumber(int number) {
		this.number = number;
	}

	public int getNumber() {
		return number;
	}
	
	public void setStr(String str) {
		this.str = str;
	}

	public String getStr() {
		return str;
	}
	
	public void setVoteOrOpinionCount(int voteOrOpinionCount) {
		this.voteOrOpinionCount = voteOrOpinionCount;
	}

	public int getVoteOrOpinionCount() {
		return voteOrOpinionCount;
	}

	public String toString(){
		StringBuffer sBuff = new StringBuffer();
		sBuff.append(this.number);
		sBuff.append(":");
		sBuff.append(this.str);
		return sBuff.toString();
	}
}
